#include <stdio.h>
#include <pthread.h>

struct algorithm
{
	int a;
	int b;
	int c;
};

void* sum(void *p)
{
	struct algorithm *p1 = (struct algorithm *)p;
	p1->a = 3;
	p1->b = 6;
	p1->c = p1->a + p1->b;
}

void* task(void *p)
{
	int *p1 = p;
	printf("p1 = %d\n",*p1);
}

int main()
{
	struct algorithm alphago ;
	pthread_t id,id2;
	int *p1 = malloc(4);
	*p1 = 300;
	pthread_create(&id , 0, task , p1);
//	free(p1);
	pthread_join(id,0);
	//printf("sum = %d\n",alphago.c);
		
}
